﻿using System;
using MugenInjection.Core.Components;
using MugenInjection.Logging.Interface;
using MugenInjection.Logging.Interface.Components;

namespace MugenInjection.Logging.Components
{
    /// <summary>
    /// The base class for changing the log message.
    /// </summary>
    public abstract class LogMutatorComponent : Component, ILogMutator
    {
        #region Method

        /// <summary>
        /// Changes the log message.
        /// </summary>
        /// <param name="loggerContext">The specified <see cref="ILoggerContext"/>.</param>
        public abstract void Mutate(ILoggerContext loggerContext);

        #endregion

        #region Overrides of Component

        /// <summary>
        /// Indicates whether the component is unique.
        /// </summary>
        public override sealed bool IsSingle
        {
            get { return false; }
        }


        /// <summary>
        /// Gets the component type. Need to find a component in the container.
        /// </summary>
        public override sealed Type ComponentType
        {
            get { return typeof(ILogMutator); }
        }

        #endregion
    }
}